package org.csmzxy.class2333;

public class example14 {
        public static void main(String[] args) {
            int sum = 0;                           //定义变量sum，初始值为0
            for (int i = 1; i <= 100; i ++){
                sum += i;                          //sum和i相加并将结果赋给sum
            }
            System.out.println("sum = " + sum);
        }
    }

